
#include "ThreadPool.h"
#include <iostream>

HTHREADPOOL_NAMESPACE_BEGIN
    ThreadPool::ThreadPool() noexcept
    : m_scheduler(12, true)
    {
        init();
    }

    void ThreadPool::init()
    {
        m_coreThreads.reserve(3);
        for(int i = 0; i < 3; i++) {
            std::unique_ptr<CoreThread> coreThread = std::make_unique<CoreThread>(i, &m_taskQueue, &m_coreThreads);
            m_coreThreads.emplace_back(std::move(coreThread));
            m_coreThreads.at(m_coreThreads.size() - 1)->start();
        }
    }

    void ThreadPool::monitor() {}
    ThreadPool::~ThreadPool() {}

HTHREADPOOL_NAMESPACE_END
